﻿using FluentValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CarAppDto.Rule.RuleConfigDtos
{
    public class RuleConfigDetailsValidator : AbstractValidator<RuleConfigDetails>
    {
        /// <summary>
        /// 校验规则写到校验类的构造方法中
        /// </summary>
        public RuleConfigDetailsValidator()
        {
            RuleFor(x => x.Position).NotEmpty();
            RuleFor(x => x.Value).NotEmpty();
    
        }
    }
    /// <summary>
    /// 规则详情
    /// </summary>
    public class RuleConfigDetails
    {
        /// <summary>
        /// 位置
        /// </summary>
        public string Position { get; set; }

        /// <summary>
        /// 值
        /// </summary>
        public string Value { get; set; }

        /// <summary>
        /// 是否选中
        /// </summary>
        public bool IsSelected { get; set; } = false;

    }
}
